<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('orders', function (Blueprint $table) {
            $table->increments('id');
            $table->string('order')->default('')->comment('订单单号');
            $table->integer('user_id')->comment('用户ID');
            $table->tinyInteger('type')->default(0)->comment('0交易币，1vip');
            $table->integer('coins')->default(0)->comment('交易币');
            $table->integer('vip')->default(12)->comment('季度,年度');
            $table->tinyInteger('status')->default(0)->comment('0未支付，1已支付');
            $table->tinyInteger('paytype')->default(0)->comment('支付类型 0：支付宝 1：微信');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('orders');
    }
}
